package com.cssl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * 座位表
 * @TableName equipment
 */
@TableName(value ="equipment")
@Data
public class Equipment implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 类型：座位或者模块 （seat，module）
     */
    private Integer seat_id;

    /**
     * 名称/编号
     */
    private String item_name;

    /**
     * 状态（主要用于座位）：online,offline,occupied,maintenance
     */
    private Integer status;

    /**
     * 网格行位置
     */
    private Integer row_position;

    /**
     * 网格列位置
     */
    private Integer col_position;

    /**
     * 楼层：floor1,floor2
     */
    private Integer floor;

    /**
     * 模块类型:wall,entrance,testing,stairs,toilet,recption（仅对模块有效）
     */
    private Integer module_type;

    /**
     * 创建时间
     */
    private LocalDateTime created_at;

    /**
     * 更新时间
     */
    private LocalDateTime updated_at;

    /**
     * 设备区域
     */
    private Integer region_id;

    /**
     * 所属区域对象
     */
    @TableField(exist = false)
    private EquipmentRegion equRegion;

    public Equipment() {
    }

    public Equipment(Integer seat_id, String item_name, Integer status, Integer row_position, Integer col_position, Integer floor, Integer module_type, LocalDateTime created_at, LocalDateTime updated_at, Integer region_id) {
        this.seat_id = seat_id;
        this.item_name = item_name;
        this.status = status;
        this.row_position = row_position;
        this.col_position = col_position;
        this.floor = floor;
        this.module_type = module_type;
        this.created_at = created_at;
        this.updated_at = updated_at;
        this.region_id = region_id;
    }

    public Equipment(Integer id, Integer seat_id, String item_name, Integer status, Integer row_position, Integer col_position, Integer floor, Integer module_type, LocalDateTime created_at, LocalDateTime updated_at, Integer region_id) {
        this.id = id;
        this.seat_id = seat_id;
        this.item_name = item_name;
        this.status = status;
        this.row_position = row_position;
        this.col_position = col_position;
        this.floor = floor;
        this.module_type = module_type;
        this.created_at = created_at;
        this.updated_at = updated_at;
        this.region_id = region_id;
    }

    public Equipment(Integer id, Integer status) {
        this.id = id;
        this.status = status;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}